using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RayFire : MonoBehaviour
{
    public bool MoveFlag = false;
    public GameObject Father;
    private float scale = 0.9f;
    // Start is called before the first frame update
    void Start()
    {
        
        Invoke("check_position", 0.1f);
    }
    void check_position()
    {
        
        transform.position = Father.transform.position+Vector3.down*1.4f;
        
        transform.localPosition += (transform.up * 12f);
        
        
    }
    // Update is called once per frame
    void Update()
    {
        scale -= Time.deltaTime * 0.4f;
        if (scale>=0&&scale <= 0.3f)
        {
            transform.localScale = new Vector3(scale, 12 ,0.3f);
        }
        if (scale < 0)
        {
            Destroy(gameObject);
        }
        
    }
}
